<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <link rel="icon" type="image/x-icon" href="http://touch.m.dangdang.com/static/h5/favicon.ico">
    <link rel="stylesheet" href="css/mui-1.min.css">
    <link rel="stylesheet" href="css/index-1.css">
    <link rel="stylesheet" href="font/font1/iconfont.css">
    <title>当当-全球领先的综合性网上购物中心</title>
</head>

<body>
    <div class="search-top">
        <a href="" class="logo">
            <img src="https://img61.ddimg.cn/2021/4/21/202104211402256635.png" alt="">
        </a>
        <a href="" class="search">
            <i class="icon-fangdajing"></i>
            <span>搜索商品/店铺/种类</span>
        </a>
        <a href="" class="more">
            <img src="https://img61.ddimg.cn/2021/4/21/202104211402256712.png" alt="">
        </a>
    </div>
    <div class="nav-img">
        <div class="topBg">
            <div class="mui-slider mui-slider1">
                <div class="mui-slider-group mui-slider-group1 mui-slider-loop">
                    <!--支持循环，需要重复图片节点-->
                    <div class="mui-slider-item mui-slider-item-duplicate">
                        <a href="#"><img src="https://img60.ddimg.cn/2024/5/24/2024052417071794056.jpg" /></a>
                    </div>
                    <div class="mui-slider-item mui-slider-item1">
                        <a href="#"><img src="https://img60.ddimg.cn/2024/8/22/2024082215133532086.jpg" /></a>
                    </div>
                    <div class="mui-slider-item">
                        <a href="#"><img src="https://img61.ddimg.cn/2024/7/17/2024071711465290454.jpg" /></a>
                    </div>
                    <div class="mui-slider-item">
                        <a href="#"><img src="http://img61.ddimg.cn/ddimg/2508/1242366-1722586965.jpg" /></a>
                    </div>
                    <div class="mui-slider-item">
                        <a href="#"><img src="https://img62.ddimg.cn/2024/7/31/2024073110221497489.jpg" /></a>
                    </div>
                    <div class="mui-slider-item">
                        <a href="#"><img src="https://img60.ddimg.cn/2024/5/24/2024052417071794056.jpg" /></a>
                    </div>
                    <!--支持循环，需要重复图片节点-->
                    <div class="mui-slider-item mui-slider-item-duplicate"><a href="#"><img
                                src="https://img60.ddimg.cn/2024/8/22/2024082215133532086.jpg" /></a></div>
                </div>
                <div class="mui-slider-indicator">
                    <div class="mui-indicator mui-active"></div>
                    <div class="mui-indicator"></div>
                    <div class="mui-indicator"></div>
                    <div class="mui-indicator"></div>
                    <div class="mui-indicator"></div>
                </div>
            </div>
        </div>
        <div class="botBg"></div>
    </div>
    <div class="nav-icon">
        <div class="mui-slider">
            <div class="mui-slider-group">
                <!--第一个内容区容器-->
                <div class="mui-slider-item">
                    <!-- 具体内容 -->
                    <div class="list">
                        <!-- 图书 -->
                        <a href="books-1.html">
                            <img src="http://img63.ddimg.cn/ddimg/2229/tushu-1620826735.png" alt="">
                        </a>
                        <!-- 童书 -->
                        <a href="childrenBook.html">
                            <img src="http://img63.ddimg.cn/ddimg/2229/tongshu-1620826775.png" alt="">
                        </a>
                        <!-- 新书榜 -->
                        <a href="aether-6.html">
                            <img src="http://img63.ddimg.cn/ddimg/2229/xinshubang-1620826881.png" alt="">
                        </a>
                        <!-- 电子书 -->
                        <a href="author-6.html">
                            <img src="https://img60.ddimg.cn/2021/11/8/2021110816081069564.png" alt="">
                        </a>
                        <!-- 当当头条 -->
                        <a href="today-headlines.html">
                            <img src="https://img63.ddimg.cn/2021/11/4/2021110418150552051.png" alt="">
                        </a>
                        <!-- 服装 -->
                        <a href="">
                            <img src="http://img63.ddimg.cn/ddimg/2229/fuzhuang-1620826753.png" alt="">
                        </a>
                        <!-- 疯狂9.9 -->
                        <a href="">
                            <img src="https://img61.ddimg.cn/2021/11/4/2021110422460978561.png" alt="">
                        </a>
                        <!-- 儿童街 -->
                        <a href="">
                            <img src="http://img60.ddimg.cn/ddimg/2229/ertongjiexin-1623317699.png" alt="">
                        </a>
                        <!-- 分类 -->
                        <a href="">
                            <img src="https://img62.ddimg.cn/2021/11/17/2021111720171975184.png" alt="">
                        </a>
                        <!-- 签到 -->
                        <a href="">
                            <img src="http://img63.ddimg.cn/ddimg/2229/qiandao-1620826984.png" alt="">
                        </a>
                    </div>
                </div>
                <!--第二个内容区-->
                <div class="mui-slider-item">
                    <!-- 具体内容 -->
                    <div class="list">
                        <!-- 童书榜 -->
                        <a href="">
                            <img src="http://img60.ddimg.cn/ddimg/2229/tongshubang-1620826800.png" alt="">
                        </a>
                        <!-- 独家特供 -->
                        <a href="offer-2.html">
                            <img src="http://img62.ddimg.cn/ddimg/2229/dujia-1620827022.png" alt="">
                        </a>
                        <!-- 今日促销 -->
                        <a href="todayPromotion.html">
                            <img src="http://img63.ddimg.cn/ddimg/2229/jinri-1620827067.png" alt="">
                        </a>
                        <!-- 童装童鞋 -->
                        <a href="">
                            <img src="https://img60.ddimg.cn/2021/11/17/2021111720195672141.png" alt="">
                        </a>
                        <!-- 88元10件 -->
                        <a href="ten.html">
                            <img src="https://img63.ddimg.cn/2021/11/17/202111171137338599.png" alt="">
                        </a>
                        <!-- 教辅 -->
                        <a href="teach.html">
                            <img src="http://img62.ddimg.cn/ddimg/2229/jiaofu-1620827008.png" alt="">
                        </a>
                        <!-- 小说 -->
                        <a href="novel-2.html">
                            <img src="http://img61.ddimg.cn/ddimg/2229/xiaoshuo-1620827043.png" alt="">
                        </a>
                        <!-- 文学 -->
                        <a href="literature-2.html">
                            <img src="http://img60.ddimg.cn/ddimg/2229/wenxue-1620827088.png" alt="">
                        </a>
                        <!-- 历史 -->
                        <a href="history-2.html">
                            <img src="http://img60.ddimg.cn/ddimg/2229/lishi-1620827109.png" alt="">
                        </a>
                        <!-- 食品 -->
                        <a href="">
                            <img src="http://img63.ddimg.cn/ddimg/2229/shipin-1620826903.png" alt="">
                        </a>
                    </div>
                </div>
            </div>
            <div class="mui-slider-indicator">
                <div class="mui-indicator mui-active"></div>
                <div class="mui-indicator"></div>
            </div>
        </div>
    </div>
    <div class="list1 padding">
        <ul class="top">
            <li>
                <p>图书畅销榜</p>
                <img src="https://img62.ddimg.cn/2021/8/12/2021081217290871590.png" alt="">
            </li>
            <li>
                <p>新书上架</p>
                <img src="https://img62.ddimg.cn/2021/8/12/202108121730088523.png" alt="">
            </li>
        </ul>
        <ul class="bottom">
            <li>
                <img src="http://img3m7.ddimg.cn/23/16/29671907-1_h_1705308944.jpg" alt="">
                <p>人一生要去的100个地方 少年游学地理百科</p>
                <img class="dengji" src="https://img61.ddimg.cn/2021/6/15/2021061514540821880.png" alt="">
            </li>
            <li>
                <img src="http://img3m3.ddimg.cn/17/30/29362823-1_h_1691635952.jpg" alt="">
                <p>一个人的村庄（精装典藏版 刘亮程作品）感动8000万人，豆瓣万人8.9高分好评！面世二十余年来作者首次修订，白岩松、周深、李锐、李娟真情推荐</p>
                <img class="dengji" src="https://img63.ddimg.cn/2021/6/15/2021061514534984141.png" alt="">
            </li>
            <li>
                <img src="http://img3m2.ddimg.cn/23/9/29625872-1_h_1695086852.jpg" alt="">
                <p>张皓宸：抬头看二十九次月亮（全彩手绘寄语印签本，写给每一个在等待月圆的你）</p>
            </li>
            <li>
                <img src="http://img3m4.ddimg.cn/35/4/29631824-1_h_1705880751.jpg" alt="">
                <p>Mathstart洛克数学启蒙（全40册）绘本妈妈海桐推荐 3-9岁</p>
            </li>
        </ul>
    </div>
    <div class="list2 padding">
        <ul>
            <li>
                <p>今日抢购</p>
                <div>
                    <span id="hour">00</span><span>:</span><span id="minute">00</span><span>:</span><span
                        id="second">00</span>
                </div>
            </li>
            <li>
                <p>查看更多</p>
                <i class="icon-yousanjiao"></i>
            </li>
        </ul>
        <ul id="change">
            <!-- <li>
                <img src="http://img3m9.ddimg.cn/51/16/12100017849-1_h_1720426654.jpg" alt="">
                <div>
                    <p>1</p>
                    <img src="https://img60.ddimg.cn/upload_img/00866/zhangleijsztyf/qiang-1624865882.png" alt="">
                </div>
                <p>22.8</p>
            </li>
            <li>
                <img src="http://img3m9.ddimg.cn/51/16/12100017849-1_h_1720426654.jpg" alt="">
                <div>
                    <p>1</p>
                    <img src="https://img60.ddimg.cn/upload_img/00866/zhangleijsztyf/qiang-1624865882.png" alt="">
                </div>
                <p>22.8</p>
            </li>
            <li>
                <img src="http://img3m9.ddimg.cn/51/16/12100017849-1_h_1720426654.jpg" alt="">
                <div>
                    <p>1</p>
                    <img src="https://img60.ddimg.cn/upload_img/00866/zhangleijsztyf/qiang-1624865882.png" alt="">
                </div>
                <p>22.8</p>
            </li>
            <li>
                <img src="http://img3m9.ddimg.cn/51/16/12100017849-1_h_1720426654.jpg" alt="">
                <div>
                    <p>1</p>
                    <img src="https://img60.ddimg.cn/upload_img/00866/zhangleijsztyf/qiang-1624865882.png" alt="">
                </div>
                <p>22.8</p>
            </li> -->
        </ul>
    </div>
    <div class="list3 padding">
        <ul class="top">
            <li>
                <p>品牌抢购</p>
                <img src="https://img62.ddimg.cn/2021/8/12/2021081217295389218.png" alt="">
            </li>
        </ul>
        <div class="mui-scroll-wrapper">
            <div class="mui-scroll">
                <ul class="bottom">
                    <li>
                        <img src="https://img60.ddimg.cn/2024/5/29/2024052914531638510.jpg" alt="">
                        <div></div>
                    </li>
                    <li>
                        <img src="http://img59.ddimg.cn/212200173587859_y.jpg" alt="">
                        <div></div>
                    </li>
                    <li>
                        <img src="https://img63.ddimg.cn/2023/3/31/2023033116024672624.png" alt="">
                        <div></div>
                    </li>
                    <li>
                        <img src="http://img52.ddimg.cn/201690283682692_y.jpg" alt="">
                        <div></div>
                    </li>
                    <li>
                        <img src="https://img63.ddimg.cn/2024/5/17/2024051710010872433.jpg" alt="">
                        <div></div>
                    </li>
                    <li>
                        查看更多
                        <i class="icon-yousanjiao1"></i>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="list4 padding">
        <div class="title">
            <span>当当书城<div></div></span>
        </div>
        <ul class="content">
            <li>
                <p>品质好书</p>
                <p>2021主编推荐</p>
                <img src="http://img3m2.ddimg.cn/77/28/29311502-1_h_1713262585.jpg" alt="">
            </li>
            <li>
                <p>阅读童年</p>
                <p>2021重磅推荐</p>
                <img src="http://img3m2.ddimg.cn/77/28/29311502-1_h_1713262585.jpg" alt="">
            </li>
            <li>
                <p>冰雪童年</p>
                <p>欢乐过大年</p>
                <img src="http://img3m9.ddimg.cn/91/26/29361709-1_h_61066.jpg" alt="">
            </li>
            <li>
                <p>经济趋势</p>
                <p>好书精选</p>
                <img src="http://img3m4.ddimg.cn/59/30/28548194-1_h_40.jpg" alt="">
            </li>
            <li>
                <p>文学艺术</p>
                <p>5折封顶</p>
                <img src="http://img3x1.ddimg.cn/43/14/29284441-1_h_3.jpg" alt="">
            </li>
            <li>
                <p>精选童书</p>
                <p>5折封顶</p>
                <img src="http://img3x9.ddimg.cn/14/28/29524289-1_h_1700530818.jpg" alt="">
            </li>
            <li>
                <p>畅读经典</p>
                <p>5折封顶</p>
                <img src="https://img60.ddimg.cn/2024/1/12/2024011209412127247.png" alt="">
            </li>
            <li>
                <p>经济新态势</p>
                <p>5折封顶</p>
                <img src="http://img3x4.ddimg.cn/17/7/25194824-1_h_1715049136.jpg" alt="">
            </li>
        </ul>
    </div>
    <div class="list5 padding">
        <ul>
            <li>
                <span>科技馆</span>
                <i class="icon-yousanjiao"></i>
            </li>
            <li>
                <span>电子书</span>
                <i class="icon-yousanjiao"></i>
            </li>
            <li>
                <span>文创文具</span>
                <i class="icon-yousanjiao"></i>
            </li>
            <li>
                <span>练字贴</span>
                <i class="icon-yousanjiao"></i>
            </li>
        </ul>
    </div>
    <div class="list6 padding">
        <div class="title">
            <span>精选图书好店▾<div></div></span>
        </div>
        <ul>
            <li>
                <div class="mui-slider">
                    <div class="mui-slider-group mui-slider-loop">
                        <!--支持循环，需要重复图片节点-->
                        <div class="mui-slider-item mui-slider-item-duplicate"><a href="#"><img
                                    src="https://img60.ddimg.cn/2024/4/2/2024040210330422997.jpg" /></a>
                        </div>
                        <div class="mui-slider-item"><a href="#"><img
                                    src="https://img63.ddimg.cn/2024/8/12/2024081211200359311.jpg" /></a></div>
                        <div class="mui-slider-item"><a href="#"><img
                                    src="https://img60.ddimg.cn/2024/4/2/2024040210330422997.jpg" /></a></div>
                        <!--支持循环，需要重复图片节点-->
                        <div class="mui-slider-item mui-slider-item-duplicate"><a href="#"><img
                                    src="https://img63.ddimg.cn/2024/8/12/2024081211200359311.jpg" /></a>
                        </div>
                    </div>
                    <div class="mui-slider-indicator">
                        <div class="mui-indicator mui-active"></div>
                        <div class="mui-indicator"></div>
                    </div>
                </div>
            </li>
            <li>
                <div>
                    <p>鸟山明作品<span>热</span></p>
                    <img src="https://img63.ddimg.cn/2024/3/8/2024030816393464319.jpg" alt="">
                </div>
                <div>
                    <p>新书推荐<span>促</span></p>
                    <img src="https://img62.ddimg.cn/2024/3/7/202403071505019633.png" alt="">
                </div>
            </li>
        </ul>
        <ul>
            <li>
                <img src="http://img53.ddimg.cn/237840256462583_y.png" alt="">
            </li>
            <li>
                <img src="http://img51.ddimg.cn/108170255002541_y.png" alt="">
            </li>
            <li>
                <img src="http://img55.ddimg.cn/122440257484825_y.png" alt="">
            </li>
            <li>
                <img src="http://img56.ddimg.cn/135360363526326_y.png" alt="">
            </li>
            <li>
                <img src="https://img60.ddimg.cn/2023/4/6/2023040610300856727.png" alt="">
            </li>
        </ul>
    </div>
    <div class="list7 padding">
        <ul>
            <li>
                <div>
                    <p>
                        <span>新华书店</span>
                        <span>百万好书5折</span>
                    </p>
                    <p>
                        精选好书
                    </p>
                </div>
                <div>
                    <p>
                        <span>名社好书</span>
                        <span>9.9元专场</span>
                    </p>
                    <p>
                        本周推荐
                    </p>
                </div>
            </li>
            <li>
                <img src="http://img54.ddimg.cn/108170254775764_y.jpg" alt="">
                <img src="https://img63.ddimg.cn/2024/1/5/2024010515335238999.jpg" alt="">
                <img src="https://img53.ddimg.cn/237840256462613_y.jpg" alt="">
                <img src="https://img61.ddimg.cn/2024/1/5/2024010516151048563.jpg" alt="">
            </li>
        </ul>
        <ul>
            <li>
                <p>凤凰新华</p>
                <p>低至5折</p>
                <img src="https://img60.ddimg.cn/2023/4/6/2023040610303965544.jpg" alt="">
            </li>
            <li>
                <p>湖南新华</p>
                <p>低至5折</p>
                <img src="https://img60.ddimg.cn/2024/1/5/2024010517130710418.jpg" alt="">
            </li>
            <li>
                <p>读客旗舰店</p>
                <p>低至9.9元</p>
                <img src="https://img63.ddimg.cn/2024/1/5/2024010516403229432.jpg" alt="">
            </li>
            <li>
                <p>海豚旗舰店</p>
                <p>低至3.5折</p>
                <img src="https://img60.ddimg.cn/2024/1/5/2024010516151753231.jpg" alt="">
            </li>
        </ul>
    </div>
    <div class="list8 padding">
        <img src="https://img62.ddimg.cn/2024/1/5/2024010515284989399.jpg" alt="">
        <ul>
            <li>
                <div>
                    <p>
                        <span>中华商务进口图书旗舰店</span>
                        <span>进口原版书</span>
                    </p>
                    <p>
                        低至5折
                    </p>
                </div>
                <div>
                    <p>
                        <span>杂志铺旗舰店</span>
                        <span>杂志订阅</span>
                    </p>
                    <p>
                        杂志5折起
                    </p>
                </div>
            </li>
            <li>
                <img src="https://img62.ddimg.cn/2023/10/18/2023101813510359499.jpg" alt="">
                <img src="https://img60.ddimg.cn/2023/10/18/2023101813515686265.jpg" alt="">
                <img src="https://img63.ddimg.cn/2023/10/18/202310181355492617.png" alt="">
                <img src="https://img63.ddimg.cn/2023/10/18/2023101813554360956.png" alt="">
            </li>
        </ul>
        <ul>
            <li>
                <p>凯迪克图书</p>
                <p>低至9.9元</p>
                <img src="https://img62.ddimg.cn/2024/1/8/20240108111452753.jpg" alt="">
            </li>
            <li>
                <p>中图上海</p>
                <p>低至5折</p>
                <img src="https://img63.ddimg.cn/2024/1/12/2024011209383853683.png" alt="">
            </li>
            <li>
                <p>千秋专营店</p>
                <p>低至5折</p>
                <img src="https://img60.ddimg.cn/2024/1/12/2024011209412127247.png" alt="">
            </li>
            <li>
                <p>雅彬图书</p>
                <p>低至5折</p>
                <img src="https://img61.ddimg.cn/2024/1/12/2024011210445922495.jpg" alt="">
            </li>
        </ul>
    </div>
    <div class="list9">
        <ul id="hide">
            <li>
                <p>为您推荐</p>
                <p>猜你喜欢</p>
            </li>
            <li>
                <p>精品书单</p>
                <p>高赞精选</p>
            </li>
        </ul>
        <div id="show">
            <div>
                <p>为您推荐</p>
                <p>精品书单</p>
            </div>
        </div>
    </div>
    <div class="list10 padding">
        <ul id="goods-left">
        </ul>
        <ul id="goods-right">
        </ul>
    </div>
    <ul class="nav-bottom">
        <li>
            <a href="">
                <i class="icon-shouye-"></i>
                <p>首页</p>
            </a>
        </li>
        <li>
            <a href="">
                <i class="icon-search-category"></i>
                <p>分类</p>
            </a>
        </li>
        <li>
            <a href="worth.html">
                <img src="https://img60.ddimg.cn/upload_img/00878/zhangleijsztyf/ic_buy-1619162901.png" alt="">
                <p>值得买</p>
            </a>
        </li>
        <li>
            <a href="car.html">
                <i class="icon-cart"></i>
                <p>购物车</p>
            </a>
        </li>
        <li>
            <a href="main.html">
                <i class="icon-My"></i>
                <p>我的当当</p>
            </a>
        </li>
    </ul>
    <div id="toTop">
        <i class="icon-zhiding"></i>
        <p>顶部</p>
    </div>
</body>
<!-- 移动端px=rem -->
<script>
    // 可以控制页面在375px屏幕上边 html根元素font-size: 18.75px;
    (function (doc, win) {
        var docEL = document.documentElement,
            resizeEvt = "orientationchange" in window ? "orientationchange" : "resize",
            recalc = function () {
                // 获取当前设备的宽度
                var clientWidth = docEL.clientWidth;
                if (!clientWidth) return;
                docEL.style.fontSize = (clientWidth / 750) * 37.5 + "px";
            };
        if (!doc.addEventListener) return;
        //添加窗口变动监听
        win.addEventListener(resizeEvt, recalc, false);
        //dom加载的时候执行一次
        doc.addEventListener("DOMContentLoaded", recalc, false);
    })(document, window);
</script>
<!-- 轮播 -->
<script src="js/mui-1.min.js"></script>
<!-- 区域滚动 -->
<script>
    mui('.mui-scroll-wrapper').scroll({
        scrollY: false, //是否竖向滚动
        scrollX: true, //是否横向滚动
        startX: 0, //初始化时滚动至x
        startY: 0, //初始化时滚动至y
        indicators: false, //是否显示滚动条
        deceleration: 0.6, //阻尼系数,系数越小滑动越灵敏
        bounce: false //是否启用回弹
    });
</script>
<!-- 今日抢购倒计时 -->
<script>
    setInterval(function () {
        var starTime = new Date()       //当前时间
        var year = starTime.getFullYear()       //当前年
        var month = starTime.getMonth() + 1     //当前月
        var day = starTime.getDate()        //当前日
        var hour = starTime.getHours()      //当前时
        var minute = starTime.getMinutes()      //当前分
        var second = starTime.getSeconds()      //当前秒

        var showHour = document.querySelector('#hour')        //显示时
        var showMinu = document.querySelector('#minute')      //显示分
        var showSecond = document.querySelector('#second')        //显示秒

        if (0 <= hour && hour < 2) {
            hour = '002'
        } else if (2 <= hour && hour < 4) {
            hour = '04'
        } else if (4 <= hour && hour < 6) {
            hour = '06'
        } else if (6 <= hour && hour < 8) {
            hour = '08'
        } else if (8 <= hour && hour < 10) {
            hour = '10'
        } else if (10 <= hour && hour < 12) {
            hour = '12'
        } else if (12 <= hour && hour < 14) {
            hour = '14'
        } else if (14 <= hour && hour < 16) {
            hour = '16'
        } else if (16 <= hour && hour < 18) {
            hour = '18'
        } else if (18 <= hour && hour < 20) {
            hour = '20'
        } else if (20 <= hour && hour < 22) {
            hour = '22'
        } else if (22 <= hour && hour < 24) {
            hour = '24'
        } else if (hour == 24) {
            hour = '002'
        }

        var endTime = new Date(
            year
            + '-' +
            (month < 10 ? ('0' + month) : month)
            + '-' +
            (day < 10 ? ('0' + day) : day)
            + ' ' +
            hour
            + ':' +
            '00'
            + ':' +
            '00'
        )

        var a = (endTime.getTime() - starTime.getTime()) / 1000
        showHour.innerHTML = Math.floor(a / (60 * 60)) < 10 ? ('0' + Math.floor(a / (60 * 60))) : Math.floor(a / (60 * 60))
        showMinu.innerHTML = Math.floor(a % (60 * 60) / 60) < 10 ? ('0' + Math.floor(a % (60 * 60) / 60)) : Math.floor(a % (60 * 60) / 60)
        showSecond.innerHTML = Math.floor(a % (60 * 60) % 60) < 10 ? ('0' + Math.floor(a % (60 * 60) % 60)) : Math.floor(a % (60 * 60) % 60)
    }, 1000)
</script>
<!-- 今日抢购商品变换 -->
<script>
    var data = [
        {
            "imgUrl": "http://img3m7.ddimg.cn/73/1/11778267277-1_h_1721705191.jpg",
            "productId": "11778267277",
            "killPrice": "1",
            "linkUrl": "http://touch.m.dangdang.com/seckill.php?isreco=1&product_id=11778267277",
            "origPrice": "396",
            "productName": "意林小国学"
        },
        {
            "imgUrl": "http://img3m3.ddimg.cn/54/11/12100011813-1_h_1717745106.jpg",
            "productId": "12100011813",
            "killPrice": "28.28",
            "linkUrl": "http://touch.m.dangdang.com/seckill.php?isreco=1&product_id=12100011813",
            "origPrice": "423.4",
            "productName": "一二三四五年级上册快乐读书吧小鲤鱼跳龙门安徒生童话中国民间故事山海经课外阅读必读书当当自营图书"
        },
        {
            "imgUrl": "http://img3m6.ddimg.cn/91/32/29711476-1_h_1719118595.jpg",
            "productId": "29711476",
            "killPrice": "9.89",
            "linkUrl": "http://touch.m.dangdang.com/seckill.php?isreco=1&product_id=29711476",
            "origPrice": "49.8",
            "productName": "一天一碗汤，彻底改变你：一碗好汤喝出好气色， 百病食疗好喝美味，低热量，清肠道，瘦腰身，喝出好身材！"
        },
        {
            "imgUrl": "http://img3m3.ddimg.cn/8/9/12100010183-1_h_1697628114.jpg",
            "productId": "12100010183",
            "killPrice": "8.98",
            "linkUrl": "http://touch.m.dangdang.com/seckill.php?isreco=1&product_id=12100010183",
            "origPrice": "58",
            "productName": "小学生好词好句好段词典（彩图版）"
        },
        {
            "imgUrl": "http://img3m8.ddimg.cn/11/31/29709218-1_h_1713155630.jpg",
            "productId": "29709218",
            "killPrice": "39.79",
            "linkUrl": "http://touch.m.dangdang.com/seckill.php?isreco=1&product_id=29709218",
            "origPrice": "149.4",
            "productName": "264种超人气面点轻松做+170种超人气蛋糕轻松做+124种超人气甜品轻松做【全3册】彩色图解版（在家就能做的超简单创意面点）"
        },
        {
            "imgUrl": "http://img3m8.ddimg.cn/50/33/12100015868-1_h_1711761813.jpg",
            "productId": "12100015868",
            "killPrice": "10.9",
            "linkUrl": "http://touch.m.dangdang.com/seckill.php?isreco=1&product_id=12100015868",
            "origPrice": "49.8",
            "productName": "世界名著"
        },
        {
            "imgUrl": "http://img3m4.ddimg.cn/88/23/29640094-1_h_1698193872.jpg",
            "productId": "29640094",
            "killPrice": "7.88",
            "linkUrl": "http://touch.m.dangdang.com/seckill.php?isreco=1&product_id=29640094",
            "origPrice": "22.8",
            "productName": "汪曾祺经典选集 家人闲坐，灯火可亲 散文集 愿你有家可回，有人可等。三餐有味，四季有景"
        },
        {
            "imgUrl": "http://img3m5.ddimg.cn/19/33/12100014055-1_h_1718957688.jpg",
            "productId": "12100014055",
            "killPrice": "38.99",
            "linkUrl": "http://touch.m.dangdang.com/seckill.php?isreco=1&product_id=12100014055",
            "origPrice": "510",
            "productName": "歪歪兔童书馆 儿童文学 如果历史是一所学校 一读就通的中国历史 到历史上的都城去旅行 通识第一课 孔子来了 世说新语来了 唐诗来了 宋词来了 哲学来了 科学来了 诗经来了 课外阅读 正版童书"
        },
        {
            "imgUrl": "http://img3m2.ddimg.cn/31/27/29753392-1_h_1720505786.jpg",
            "productId": "29753392",
            "killPrice": "7.86",
            "linkUrl": "http://touch.m.dangdang.com/seckill.php?isreco=1&product_id=29753392",
            "origPrice": "19.8",
            "productName": "细菌世界历险记：灰尘的旅行 快乐读书吧四年级下册推荐（中小学生课外阅读指导丛书）无障碍精读版中小学生课外阅读经典"
        },
        {
            "imgUrl": "http://img3m7.ddimg.cn/29/7/23927537-1_h_1693381708.jpg",
            "productId": "23927537",
            "killPrice": "7.99",
            "linkUrl": "http://touch.m.dangdang.com/seckill.php?isreco=1&product_id=23927537",
            "origPrice": "19.8",
            "productName": "小学生同步作文5年级 黄冈作文 作文书素材辅导五年级10-11岁适用满分作文大全"
        },
        {
            "imgUrl": "http://img3m4.ddimg.cn/14/2/25190564-1_h_1693804458.jpg",
            "productId": "25190564",
            "killPrice": "11.8",
            "linkUrl": "http://touch.m.dangdang.com/seckill.php?isreco=1&product_id=25190564",
            "origPrice": "31",
            "productName": "罗生门（芥川龙之介小说集。《人间失格》作者太宰治是芥川的头号书迷）"
        },
        {
            "imgUrl": "http://img3m1.ddimg.cn/9/31/24021171-1_h_10.jpg",
            "productId": "24021171",
            "killPrice": "9.5",
            "linkUrl": "http://touch.m.dangdang.com/seckill.php?isreco=1&product_id=24021171",
            "origPrice": "26",
            "productName": "安妮日记（传奇影星奥黛丽·赫本说：“那个孩子完全写出了我的感受。”）"
        },
        {
            "imgUrl": "http://img3m3.ddimg.cn/75/25/11551753893-1_h_1697592922.jpg",
            "productId": "11551753893",
            "killPrice": "9.9",
            "linkUrl": "http://touch.m.dangdang.com/seckill.php?isreco=1&product_id=11551753893",
            "origPrice": "49.8",
            "productName": "益智游戏"
        }
    ]
    var j = 0
    var ul = document.querySelector('#change')

    for (var i = 0; i < 4; i++) {
        ul.innerHTML += `
            <li>
                <img src="${data[j].imgUrl}" alt="">
                <div>
                    <p>${data[j].killPrice}</p>
                    <img src="https://img60.ddimg.cn/upload_img/00866/zhangleijsztyf/qiang-1624865882.png" alt="">
                </div>
                <p>${data[j].origPrice}</p>
            </li>
        `
        j++
    }

    var li = document.querySelectorAll('#change li')
    var img = document.querySelectorAll('#change li img:nth-child(1)')
    var p = document.querySelectorAll('#change li p')

    setInterval(function () {
        for (let i = 0; i < 4; i++) {
            setTimeout(function () {
                if (j > 12) {
                    j = 0
                }
                // 消失
                img[i].setAttribute('style', 'opacity: 0;transform: scale(.5);transition: all .3s;')
                p[i * 2].setAttribute('style', 'opacity: 0;transition: all .3s;')
                p[i * 2 + 1].setAttribute('style', 'opacity: 0;transition: all .3s;')
                // 变数据
                setTimeout(function () {
                    img[i].setAttribute('src', `${data[j].imgUrl}`)
                    p[i * 2].innerHTML = data[j].killPrice
                    p[i * 2 + 1].innerHTML = data[j].origPrice
                }, 300)
                // 出现
                setTimeout(function () {
                    img[i].removeAttribute('style', 'opacity: 0;transform: scale(.5);transition: all .3s;')
                    p[i * 2].removeAttribute('style', 'opacity: 0;transition: all .3s;')
                    p[i * 2 + 1].removeAttribute('style', 'opacity: 0;transition: all .3s;')
                    j++
                }, 350)
            }, 1000 * i)
        }
    }, 10000)
</script>
<!-- 商品详情 -->
<script>
    var ulL = document.querySelector('#goods-left')     //左边
    var ulR = document.querySelector('#goods-right')        //右边

    fetch('http://api.dangdang.com/jmapi/cms/getRecoForYou?client_version=1.0&user_client=touch&permanent_id=20240901120234124283599121022503350&udid=a10c3c2e759541507f1af50a8ec01bab&timestamp=1725274221533&union_id=&unionId=&cv=1.0&ct=touch&ts=1725274221533&time_code=90b97d7d397d9506a99e9c8a7790fcf6&tc=c40d9c5860e4f4134eaf4ebf639a3032&page_size=100&page_off=1&call_id=1&source=home&list_version=1.2.0&rotation_on=0&domain=app.gateway.mix.api&refer=mix&version=1').then(res => res.json()).then(res1 => {
        var data = res1.data.result_list
        // console.log(data)
        // console.log(data[0].result_items[0].item_labels[0].label_kind == 0 ? 'span0' : 'span1')
        for (var i = 0; i < data.length; i++) {
            if (i % 2 == 0) {
                ulL.innerHTML +=
                    `
                <li>
                    <img src="${data[i].result_items[0].item_img}" alt="">
                    <p>${data[i].result_items[0].item_title}</p>
                    <div class="label label${i}"></div>
                    <div class="price">
                        <div>
                            <span>￥</span>
                            <span>${data[i].result_items[0].price_effect.slice(0, data[i].result_items[0].price_effect.length - 3)}</span>
                            <span>${data[i].result_items[0].price_effect.slice(data[i].result_items[0].price_effect.length - 3, data[i].result_items[0].price_effect.length)}</span>
                        </div>
                        <p>找相似</p>
                    </div>
                </li>
            `
                var div = document.querySelector(`.label${i}`)
                // console.log(div)
                for (var j = 0; j < data[i].result_items[0].item_labels.length; j++) {
                    div.innerHTML +=
                        `
                    <span class="${data[i].result_items[0].item_labels[j].label_kind == 0 ? 'span0' : 'span1'}">${data[i].result_items[0].item_labels[j].label_nm}</span>
                `
                }
            } else {
                ulR.innerHTML +=
                    `
                <li>
                    <img src="${data[i].result_items[0].item_img}" alt="">
                    <p>${data[i].result_items[0].item_title}</p>
                    <div class="label label${i}"></div>
                    <div class="price">
                        <div>
                            <span>￥</span>
                            <span>${data[i].result_items[0].price_effect.slice(0, data[i].result_items[0].price_effect.length - 3)}</span>
                            <span>${data[i].result_items[0].price_effect.slice(data[i].result_items[0].price_effect.length - 3, data[i].result_items[0].price_effect.length)}</span>
                        </div>
                        <p>找相似</p>
                    </div>
                </li>
            `
                var div = document.querySelector(`.label${i}`)
                for (var j = 0; j < data[i].result_items[0].item_labels.length; j++) {
                    div.innerHTML +=
                        `
                    <span class="${data[i].result_items[0].item_labels[j].label_kind == 0 ? 'span0' : 'span1'}">${data[i].result_items[0].item_labels[j].label_nm}</span>
                `
                }
            }
        }
    })

</script>
<!-- 置顶&粘性定位 -->
<script>
    var list2 = document.querySelector('.list2')
    var toTop = document.querySelector('#toTop')
    var hide = document.querySelector('#hide')
    var show = document.querySelector('#show')
    toTop.onclick = function () {
        window.scrollTo({ top: 0, behavior: 'smooth' })
    }
    window.onscroll = function () {
        var a = window.scrollY;
        if (a > list2.offsetTop) {
            toTop.setAttribute('style', 'display: block')
        } else {
            toTop.setAttribute('style', 'display: none')
        }
        if (a > hide.offsetTop + 10) {
            show.setAttribute('style', 'display: block')
            hide.style.opacity = '0'
        } else {
            show.setAttribute('style', 'display: none')
            hide.style.opacity = '1'
            // console.log(hide.offsetTop)
        }
    }
</script>


</html>